Skip to main content

Debug Header

(QW.DebugHeaderRule)

Overview

This is a private feature developed by Qwilt.

Use this feature to include helpful debugging information--such as internal identifiers and transaction details--in the client response, but only when the specified debug header and value are present in the client request. This allows you to test features for specific users or requests without affecting general traffic.

When the client request includes the header and value set in the QW.DebugHeaderRule configuration object (the match conditions), the response includes an X-OC-Debug-Info header containing debugging information.

Example

In the following example, if the client sends a request with the header X-Qwilt-Debug: true, the response includes the X-OC-Debug-Info header with debugging data. This is just one example. Whatever header and value you specify, their presence in the request triggers the debug response.

{
"generic-metadata-type": "MI.PrivateFeature.Qwilt.QW.DebugHeaderRule",
"generic-metadata-value": {
"request-header-name": "X-Qwilt-Debug",
"request-header-value": "true"
}
}


Example response:

< x-oc-debug-info: {
"listenSock": "127.0.0.1:8080",
"trxId": "1000000000047b22-1234567-1",
"sig": "abc123fakeSig",
"serviceType": "LIVE",
"disk": "1",
"cacheStatus": "MISS",
"cacheKey": "59a6c1bb29e77bd1a34b027fd1234567",
"cacheKeyStr": "stream1/fakevideo.isml/dash/3-5-video=450000.dash&filter=none&t=0&vbegin=0",
"cacheExpiry": "0",
"proxyType": "ORIGIN",
"proxyDest": "origin.example.com",
"proxyAddr": "203.0.113.42:80",
"proxyStatus": "404",
"rr": "kProxyResponse4xx",
"prr": "kNginxCacheMiss",
"cpFailure": "kStatus4xx"
}

Supported Properties

FieldDescription
request-header-nameName (string) of the HTTP header to look for in the client request.
request-header-valueThe value (string) the header must have to be considered a match.